﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Modeling_Sub_Pages_NewsPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            int id = Convert.ToInt32(Request.QueryString["id"].ToString());

            if (id == 0)
            {
                Label1.Text = "Successful add new event!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 1)
            {
                Label1.Text = "Failure add new event!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 2)
            {
                Label1.Text = "Successful edit new event!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 3)
            {
                Label1.Text = "Failure edit new event!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 4)
            {
                Label1.Text = "Successful add new course!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 5)
            {
                Label1.Text = "Failure add new course!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if(id == 6)
            {
                Label1.Text = "Successful add new News!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 7)
            {
                Label1.Text = "Failure add new News!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 8)
            {
                Label1.Text = "Successful edit new News!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 9)
            {
                Label1.Text = "Failure edit new News!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 10)
            {
                Label1.Text = "Successful add new Course!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 11)
            {
                Label1.Text = "Failure add new Course!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 12)
            {
                Label1.Text = "Can not edit end course!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 13)
            {
                Label1.Text = "Successful edit new Course!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 14)
            {
                Label1.Text = "Failure edit new Course!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 15)
            {
                Label1.Text = "Successful add Student!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 16)
            {
                Label1.Text = "Failure add Student!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else if (id == 17)
            {
                Label1.Text = "Successful edit Student!";
                Label1.ForeColor = System.Drawing.Color.Green;
            }
            else if (id == 18)
            {
                Label1.Text = "Failure edit Student!";
                Label1.ForeColor = System.Drawing.Color.Red;
            }
            else
            {
                Response.Redirect("~/ErrorPage.aspx");
            }
        }
        catch (Exception)
        {
            Response.Redirect("~/ErrorPage.aspx");
        }
    }
}